using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace JNPF.Basics.Models
{
    /// <summary>
    ///贷款明细表
    /// </summary>
    [Table("JIUSHI_CUSTOMERLOANDETAIL")]
    public class CustomerloandetailEntity
    {
        /// <summary>
        /// 主键ID
        /// </summary>
        [Key]
        [Column("F_ID")]
        [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        public int? Id { get; set; }

        /// <summary>
        /// 续贷业务主键
        /// </summary>
        [Column("F_SERIALID")]
        public string Serialid { get; set; }

        /// <summary>
        /// 续贷业务主键
        /// </summary>
        [Column("F_CUSTOMERLOANUUID")]
        public string CustomerLoanUUID { get; set; }

        /// <summary>
        /// 续贷业务主键
        /// </summary>
        [Column("F_PARENTSERIALID")]
        public string ParentSerialid { get; set; }

        /// <summary>
        /// 合伙人ID
        /// </summary>
        [Column("F_PARTNERUSERID")]
        public string PartnerUserId { get; set; }

        /// <summary>
        /// 合伙人名称
        /// </summary>
        [Column("F_PartnerUserRealName")]
        public string PartnerUserRealName { get; set; }

        /// <summary>
        /// 合伙人积分
        /// </summary>
        [Column("F_PARTNERPOINT")]
        public decimal? PartnerPoint { get; set; }

        /// <summary>
        /// 上级合伙人ID
        /// </summary>
        [Column("F_PARENTPARTNERUSERID")]
        [MaxLength(255)]
        public string ParentPartnerUserId { get; set; }

        /// <summary>
        /// 上级合伙人名称
        /// </summary>
        [Column("F_PARENTPARTNERUSERREALNAME")]
        [MaxLength(255)]
        public string ParentPartnerUserRealName { get; set; }

        /// <summary>
        /// 上级合伙人积分(抽佣)
        /// </summary>
        [Column("F_PARENTUSERPOINTS")]
        public decimal? ParentUserPoints { get; set; }

        /// <summary>
        /// 类型,4：终止 0:跟进中 1：放款 2：续贷  3：结清
        //        (点续贷款，上笔结清。 当前 只有续贷和结清
        //放款之后，只有 续贷  和结清
        //跟进中 只有放款 和终止  
        //）
        /// </summary>
        [Column("F_TYPE")]
        public int? Type { get; set; }


        /// <summary>
        /// 结束日期
        /// </summary>
        [Column("F_ENDDATE")]
        public DateTime? EndDate { get; set; }


        /// <summary>
        /// 结清贷款金额
        /// </summary>
        [Column("F_EndLendingAmount")]
        public decimal? EndLendingAmount { get; set; }


        /// <summary>
        /// 结清原因
        /// </summary>
        [Column("F_EndLendingDesc")]
        public string EndLendingDesc { get; set; }
        


        /// <summary>
        /// 放款时间
        /// </summary>
        [Column("F_LENDINGDATE")]
        public DateTime? LendingDate { get; set; }

        /// <summary>
        /// 产品详情
        /// </summary>
        [Column("F_DETAIL")]
        [MaxLength(255)]
        public string Detail { get; set; }


        /// <summary>
        /// 排序
        /// </summary>
        [Column("F_SORTCODE")]
        public int? SortCode { get; set; }


        /// <summary>
        /// 合伙人提成积分(关联提成)
        /// </summary>
        [Column("F_PARTNERPOINTS")]
        public decimal? PartnerPoints { get; set; }

        /// <summary>
        /// 上级合伙人提成积分（关联上级抽佣比例）
        /// </summary>
        [Column("F_PARENTPARTNERPOINTS")]
        public decimal? ParentPartnerPoints { get; set; }

        /// <summary>
        /// 有效标志
        /// </summary>
        [Column("F_ENABLEDMARK")]
        public int? EnabledMark { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        [Column("F_CREATORTIME")]
        public DateTime? CreatorTime { get; set; }

        /// <summary>
        /// 创建用户
        /// </summary>
        [Column("F_CREATORUSERID")]
        [MaxLength(50)]
        public string CreatorUserId { get; set; }

        /// <summary>
        /// 修改时间
        /// </summary>
        [Column("F_LASTMODIFYTIME")]
        public DateTime? LastModifyTime { get; set; }

        /// <summary>
        /// 修改用户
        /// </summary>
        [Column("F_LASTMODIFYUSERID")]
        [MaxLength(50)]
        public string LastModifyUserId { get; set; }

        /// <summary>
        /// 删除标志
        /// </summary>
        [Column("F_DELETEMARK")]
        public int? DeleteMark { get; set; }

        /// <summary>
        /// 删除时间
        /// </summary>
        [Column("F_DELETETIME")]
        public DateTime? DeleteTime { get; set; }

        /// <summary>
        /// 删除用户
        /// </summary>
        [Column("F_DELETEUSERID")]
        [MaxLength(50)]
        public string DeleteUserId { get; set; }

        /// <summary>
        /// 创建用户
        /// </summary>
        [Column("F_CREATORUSER")]
        [MaxLength(50)]
        public string CreatorUser { get; set; }

        /// <summary>
        /// 贷款金额
        /// </summary>
        [Column("F_AMOUNT")]
        public decimal? Amount { get; set; }

        /// <summary>
        /// 贷款期限
        /// </summary>
        [Column("F_TERM")]
        [MaxLength(255)]
        public string Term { get; set; }

        /// <summary>
        /// 贷款利率
        /// </summary>
        [Column("F_RATE")]
        public decimal? Rate { get; set; }

        /// <summary>
        /// 担保方式
        /// </summary>
        [Column("F_METHOD")]
        [MaxLength(255)]
        public string Method { get; set; }


        /// <summary>
        /// 附件信息
        /// </summary>
        [Column("F_ATTACHMENT")]
        [MaxLength(65535)]
        public string Attachment { get; set; }


        /// <summary>
        /// 附件信息
        /// </summary>
        [Column("F_EndAttachment")]
        [MaxLength(65535)]
        public string EndAttachment { get; set; }




        /// <summary>
        /// 客户名称
        /// </summary>
        [NotMapped] 
        public string customerName { get; set; }



    }
}
